"""
模板过滤器
"""
from django.template import Library

register = Library()


@register.filter(name="strSplit")
def strSplit(value, key):
    """
    按照执行的字符切分数据
    """
    if value == '':
        return []
    else:
        return value.split(key)
